/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package model;

import java.util.Date;

/**
 * The Class Loan.
 */
public class Loan implements java.io.Serializable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The id. */
	private Integer id;
	
	/** The exemplar. */
	private Exemplar exemplar;
	
	/** The state. */
	private Integer state;
	
	/** The loan date. */
	private Date loanDate;
	
	/** The return date. */
	private Date returnDate;
	
	/** The extension. */
	private Integer extension;
	
	/** The warning. */
	private Integer warning;
	
	/** The client. */
	private Client client;

	/**
	 * Instantiates a new loan.
	 */
	public Loan() {
	}

	/**
	 * Instantiates a new loan.
	 * 
	 * @param exemplar
	 *            the exemplar
	 * @param state
	 *            the state
	 * @param loanDate
	 *            the loan date
	 * @param returnDate
	 *            the return date
	 */
	public Loan(Exemplar exemplar, Integer state, Date loanDate, Date returnDate) {
		this.exemplar = exemplar;
		this.state = state;
		this.loanDate = loanDate;
		this.returnDate = returnDate;
		this.extension = 0;
		this.warning = 0;
	}

	/**
	 * Instantiates a new loan.
	 * 
	 * @param exemplar
	 *            the exemplar
	 * @param state
	 *            the state
	 * @param loanDate
	 *            the loan date
	 * @param returnDate
	 *            the return date
	 * @param extension
	 *            the extension
	 * @param warning
	 *            the warning
	 */
	public Loan(Exemplar exemplar, Integer state, Date loanDate,
			Date returnDate, Integer extension, Integer warning) {
		this.exemplar = exemplar;
		this.state = state;
		this.loanDate = loanDate;
		this.returnDate = returnDate;
		this.extension = extension;
		this.warning = warning;
	}

	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public Integer getId() {
		return this.id;
	}

	/**
	 * Sets the id.
	 * 
	 * @param id
	 *            the new id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Gets the exemplar.
	 * 
	 * @return the exemplar
	 */
	public Exemplar getExemplar() {
		return this.exemplar;
	}

	/**
	 * Sets the exemplar.
	 * 
	 * @param exemplar
	 *            the new exemplar
	 */
	public void setExemplar(Exemplar exemplar) {
		this.exemplar = exemplar;
	}

	/**
	 * Gets the state.
	 * 
	 * @return the state
	 */
	public Integer getState() {
		return this.state;
	}

	/**
	 * Sets the state.
	 * 
	 * @param state
	 *            the new state
	 */
	public void setState(Integer state) {
		this.state = state;
	}

	/**
	 * Gets the loan date.
	 * 
	 * @return the loan date
	 */
	public Date getLoanDate() {
		return this.loanDate;
	}

	/**
	 * Sets the loan date.
	 * 
	 * @param loanDate
	 *            the new loan date
	 */
	public void setLoanDate(Date loanDate) {
		this.loanDate = loanDate;
	}

	/**
	 * Gets the return date.
	 * 
	 * @return the return date
	 */
	public Date getReturnDate() {
		return this.returnDate;
	}

	/**
	 * Sets the return date.
	 * 
	 * @param returnDate
	 *            the new return date
	 */
	public void setReturnDate(Date returnDate) {
		this.returnDate = returnDate;
	}

	/**
	 * Gets the extension.
	 * 
	 * @return the extension
	 */
	public Integer getExtension() {
		return this.extension;
	}

	/**
	 * Sets the extension.
	 * 
	 * @param extension
	 *            the new extension
	 */
	public void setExtension(Integer extension) {
		this.extension = extension;
	}

	/**
	 * Gets the warning.
	 * 
	 * @return the warning
	 */
	public Integer getWarning() {
		return this.warning;
	}

	/**
	 * Sets the warning.
	 * 
	 * @param warning
	 *            the new warning
	 */
	public void setWarning(Integer warning) {
		this.warning = warning;
	}

	/**
	 * Gets the client.
	 * 
	 * @return the client
	 */
	public Client getClient() {
		return this.client;
	}

	/**
	 * Sets the client.
	 * 
	 * @param client
	 *            the new client
	 */
	public void setClient(Client client) {
		this.client = client;
	}
}
